<?php $start = microtime(TRUE); ?>
<?php 
include "./adminfunctions.php";
session_start();
if(!session_is_registered("username")){
header("location:index.php");
}
$content = file_get_contents("welcometext.txt");
$content=addslashes(preg_replace('`[\r\n]`','\n',$content));

?>
<html>
<head>
<title>Admin Panel :: Edit Front Page</title>
<?php css($css); ?>
  <script type="text/javascript" src="editor.js"></script>

</head>

<body>
<?php qheader(); ?>
<center>
Admin: <?php adminlinks(); ?>
<br><br><br>
<br>
<font face="arial" size="3"><br>
<div id="body">
 
 <form method="post" onsubmit="editor1.prepareSubmit();" action="changefront.php">
     <script type="text/javascript">
      var editor1 = new WYSIWYG_Editor('editor1','<?php echo $content ?>');
      editor1.display();
     </script>
     <noscript>
     <form method="post" action="changefront.php">
<textarea rows="20" cols="60" name="editor1_content">
<?
echo htmlspecialchars(file_get_contents("welcometext.txt"));
?>
</textarea>
<br>
</form>

     </noscript>
<input type="submit" value="Submit" name="update" /><br /><br />
</form>


</div></body>


</div>

<br><br><font size="2">
<?php footer(); ?>
<?php
$finish = microtime(TRUE);
$total_time = round(($finish - $start), 4);
echo '<br>Page generated in '.$total_time.' seconds.'."\n";   
?>
</font>
</center>
</html>

